unstable sorting algorithm